﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ecreate.Data.Hibernate
{
    public class ISessionStorageFactory
    {
        /**/
        /// <summary>
        /// 获得ISessionStorage
        /// </summary>
        /// <returns></returns>
        public static ISessionStorage GetSessionStorage()
        {
            if (Config.SessionSourceType == "web")  //使用    
            {
                return new WebStorage();
            }
            else if (Config.SessionSourceType == "win")
            {
                return new WinStorage();
            }
            else
            {
                throw new NotSupportedException("不支持的SessionSourceType！" + Config.SessionSourceType);
            }
        }
    }

}
